commonlibsse_ng\re\i/
InteriorData.rs

1use crate::re::{
2    BGSDirectionalAmbientLightingColors::BGSDirectionalAmbientLightingColors, Color::Color,
3};
4
5bitflags::bitflags! {
6    /// Bitflags representing inheritance settings for interior lighting data.
7    #[repr(transparent)]
8    #[derive(Debug, Clone, Copy, PartialEq, Eq)]
9    pub struct Inherit: u32 {
10        const AMBIENT_COLOR         = 1 << 0;
11        const DIRECTIONAL_COLOR     = 1 << 1;
12        const FOG_COLOR             = 1 << 2;
13        const FOG_NEAR              = 1 << 3;
14        const FOG_FAR               = 1 << 4;
15        const DIRECTIONAL_ROTATION  = 1 << 5;
16        const DIRECTIONAL_FADE      = 1 << 6;
17        const CLIP_DISTANCE         = 1 << 7;
18        const FOG_POWER             = 1 << 8;
19        const FOG_MAX               = 1 << 9;
20        const LIGHT_FADE_DISTANCES  = 1 << 10;
21    }
22}
23
24/// Represents interior lighting data.
25#[repr(C)]
26#[derive(Debug, Clone, PartialEq)]
27pub struct INTERIOR_DATA {
28    pub ambient: Color,                                                           // 00
29    pub directional: Color,                                                       // 04
30    pub fog_color_near: Color,                                                    // 08
31    pub fog_near: f32,                                                            // 0C
32    pub fog_far: f32,                                                             // 10
33    pub directional_xy: u32,                                                      // 14
34    pub directional_z: u32,                                                       // 18
35    pub directional_fade: f32,                                                    // 1C
36    pub clip_dist: f32,                                                           // 20
37    pub fog_power: f32,                                                           // 24
38    pub directional_ambient_lighting_colors: BGSDirectionalAmbientLightingColors, // 28
39    pub fog_color_far: Color,                                                     // 48
40    pub fog_clamp: f32,                                                           // 4C
41    pub light_fade_start: f32,                                                    // 50
42    pub light_fade_end: f32,                                                      // 54
43    pub lighting_template_inheritance_flags: Inherit,                             // 58
44    pub unk5c: u32, // 5C - interiorOffset?
45}
46
47const _: () = {
48    assert!(core::mem::size_of::<INTERIOR_DATA>() == 0x60);
49};